from django.contrib import admin
from .models import *
# Register your models here.

@admin.register(TeacherBase)
class TeacherBaseAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','name','sex','birthday','IDcard','nation','political_climate','address')
    list_editable =('name','sex','birthday','IDcard','nation','political_climate','address')
    list_filter = ('name',)
    # list_per_page = 20

@admin.register(TeacherSchool)
class TeacherSchoolAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','name','school','grade','class_bj','subject','address','start_date','end_date')
    list_editable =('name','school','grade','class_bj','subject','address','start_date','end_date')
    list_filter = ('name',)
    # # 分页，每页显示条数
    # list_per_page = 20

@admin.register(TeacherFamily)
class TeacherFamilyAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','name','fname','fIDcard','relationship','fnation','address','work','workunit','workaddress')
    list_editable =('name','fname','fIDcard','relationship','fnation','address','work','workunit','workaddress')
    list_filter = ('name',)
    # # 分页，每页显示条数
    # list_per_page = 20

@admin.register(TeacherExpend)
class TeacherExpendAdmin(admin.ModelAdmin):
     # 显示的列表信息
    list_display = ('id','name','recogntion_date','participate_date','hometown','employment_type')
    list_editable =('name','recogntion_date','participate_date','hometown','employment_type')
    list_filter = ('name',)
    search_fields= ['name',]
    # # 分页，每页显示条数
    # list_per_page = 20

    